package com.ilink.ilinkcommon.domain.PO.studyservice;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.JsonNode;
import com.ilink.ilinkcommon.utils.typehandler.JsonNodeTypeHandler;

import java.io.Serializable;
import java.sql.Timestamp;
import lombok.Data;


@TableName(value ="file_transcription_task_info")
@Data
public class FileTranscriptionTaskResponse implements Serializable {
    /* ID */
    @TableId(value ="task_id", type = IdType.INPUT)
    private String taskId;

    @TableField(exist = false)
    private String code;
    @TableField(exist = false)
    private String message;
    @TableField(exist = false)
    private String requestId;
    /* 时间戳 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private Timestamp createdAt;

    /* 任务状态  ONGOING，COMPLETED，FAILED，INVALID*/
    private String taskStatus;

    /* 错误代码 task_status='FAILED'有值 */
    @TableField(exist = false)
    private String errorCode;

    /* 错误信息  task_status='FAILED'有值*/
    @TableField(exist = false)
    private String errorMessage;

    /* 转码mp3结果路径 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode outputMp3Path;

//    /* 转码mp4结果路径 */
//    @TableField(typeHandler = JsonNodeTypeHandler.class)
//    private JsonNode outputMp4Path;

    /* 转写结果 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode transcription;

    /* 章节速览 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode autoChapters;

    /* 摘要总结 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode summarization;

    /* 要点提炼 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode meetingAssistance;

    /* ppt */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode pptExtraction;

    /* 翻译 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode translation;

    /* 口语书面化结果 */
    @TableField(typeHandler = JsonNodeTypeHandler.class)
    private JsonNode textPolish;

    public FileTranscriptionTaskResponse() {

    }
}
